<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
    <script type="text/javascript" src="../js/axios.min.js"></script>
    <script type="text/javascript" src="../js/vue-router.js"></script>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>
    <link type="text/css" rel="stylesheet" href="../css/bootstrap.min.css">
</head>

<body>
    <div class="container">
        <div id="app">
            <hk-h3></hk-h3>
        </div>
    </div>
    <script>
        // 1.1 使用Vue.extend来创建全局的Vue组件
        var com1 = Vue.extend({
            template: `
                <h3>我是一个组件中的H3</h3>
            `
        });

        // 1.2 使用Vue.component('组件的名称', 创建出来的组件的模板对象)
        Vue.component('hk-h3', com1);

        var vm = new Vue({
            el: '#app',
            data: {},
            methods: {}
        });
    </script>
</body>

</html>